package com.spider.admin.store.primary.mapper;
import com.spider.admin.store.primary.model.ClientTenantInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface ClientTenantMapper {
    @Select("SELECT tci.pid client_id,tci.client_key,tai.tenant_name,tci.client_name,tai.tenant_id FROM t_account_info tai,t_client_info tci WHERE tai.tenant_id=tci.tenant_id AND tai.archive_status='active' AND tci.archive_status='active'")
    @Results(value = {
            @Result(column = "client_id",property = "clientId"),
            @Result(column = "client_key",property = "clientKey"),
            @Result(column = "tenant_name",property = "tenantName"),
            @Result(column = "client_name",property = "clientName"),
            @Result(column = "tenant_id",property = "tenantKey")
    })
    List<ClientTenantInfo> queryClientTenants();
}

